<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>排行榜</title>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: "Microsoft YaHei", sans-serif;
      background-color: #f5f5f5;
      max-width: 600px;
      margin: 0 auto;
    }

    .header {
      background-color: #e63946;
      color: white;
      padding: 15px;
      text-align: center;
    }

    .header h1 {
      font-size: 24px;
      margin-bottom: 10px;
    }

    .tabs {
      display: flex;
      justify-content: center;
    }

    .tab {
      padding: 10px 20px;
      cursor: pointer;
      border-radius: 0;
      margin: 0;
      width: 50%;
    }

    .tab.active {
      background-color: #c11f2a;
    }

    .article-tag {
      background-color: #e63946;
      color: white;
      display: inline-block;
      padding: 5px 10px;
      margin: 10px;
    }

    .article-list {
      margin: 0 10px;
    }

    .article {
      background-color: white;
      border-radius: 5px;
      margin-bottom: 15px;
      padding: 15px;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .article-top {
      background-color: #e63946;
      color: white;
      display: inline-block;
      padding: 3px 8px;
      border-radius: 3px;
      margin-bottom: 10px;
      font-size: 14px;
    }

    .article img {
      width: 100%;
      height: 250px; /* 缩小图片高度 */
      object-fit: cover; /* 保持比例并裁剪 */
      border-radius: 3px;
      margin-bottom: 12px;
    }

    .article h3 {
      font-size: 17px;
      margin-bottom: 10px;
      color: #333;
      line-height: 1.4;
    }

    .article-info {
      display: flex;
      align-items: center;
      color: #666;
      font-size: 14px;
      margin-top: 8px;
    }

    .article-info span {
      margin-right: 15px;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .article-info span::before {
      opacity: 0.7;
    }

    .article-info span:first-child::before {
      content: "💬";
    }

    .article-info span:last-child::before {
      content: "👍";
    }

    .tag {
      display: inline-block;
      background-color: #f1f1f1;
      padding: 3px 8px;
      border-radius: 3px;
      margin-right: 5px;
      font-size: 12px;
      color: #666;
      margin-top: 5px;
    }

    /* 响应式调整 */
    @media (max-width: 600px) {
      .article img {
        height: 140px; /* 移动端进一步缩小图片 */
      }
    }
  </style>
</head>

<body>
  <div class="header">
    <h1>排行榜</h1>
    <div class="tabs">
      <div class="tab active">好文精选</div>
      <div class="tab">热门资讯</div>
    </div>
  </div>
  <div class="article-tag">文章</div>
  <div class="article-list">
    <div class="article">
      <div class="article-top">TOP 1</div>
      <img src="top1.png" alt="少子化阴影下，是日本年轻人喘不过气的生存困境。">
      <h3>少子化阴影下，是日本年轻人喘不过气的生存困境。</h3>
      <div class="tag">国际</div>
      <div class="article-info">
        <span>评论 105</span>
        <span>点赞 345</span>
      </div>
    </div>
    <div class="article">
      <div class="article-top">TOP 2</div>
      <img src="top2.png" alt="后来遇见的人，都是带着他的影子，又都不是他。">
      <h3>后来遇见的人，都是带着他的影子，又都不是他。</h3>
      <div class="tag">情感</div>
      <div class="article-info">
        <span>评论 151</span>
        <span>点赞 132</span>
      </div>
    </div>
    <div class="article">
      <div class="article-top">TOP 3</div>
      <img src="top3.jpg" alt="国庆去哪玩，十个令人难忘的旅游胜地">
      <h3>国庆去哪玩，十个令人难忘的旅游胜地</h3>
      <div class="tag">旅游</div>
      <div class="article-info">
        <span>评论 89</span>
        <span>点赞 210</span>
      </div>
    </div>
  </div>
</body>

</html>
    